

RUBBER_INSTALLED := $(shell command -v rubber 2>/dev/null)

all: dia inkscape latex

latex: main.tex
ifdef RUBBER_INSTALLED
	rubber -d $<
else
	@echo "=============================="
	@echo "= consider installing rubber ="
	@echo "=============================="
endif

dia:
	make -C dia
	
inkscape:
	make -C inkscape
	

clean:
	rm -f *.out
	rm -f *.toc
	rm -f *.log
	rm -f *.aux
	rm -f *.pdf
	rm -f *.bbl
	rm -f *.blg
	make clean -C ./dia
	make clean -C ./inkscape
	

.PHONY: dia
.PHONY: inkscape
.PHONY: clean
.PHONY: all



